---
title: "Create a weather tool"
description: "Learn how to create a weather tool using BaseAI in your Node.js project."
tags:
    - baseai
    - langbase
    - learn
section: "nodejs"
published: 2024-09-24
modified: 2024-09-24
---

# Create a weather tool

### Learn how to create a weather tool using BaseAI in your Node.js project

---

In this learn guide, we will create a **weather** tool using BaseAI.

<Note sub="/learn">
This guide is part of the /learn BaseAI course. For context, [start from the beginning](/learn) to follow along.
</Note>

---

## Run `tool`

Let's create a tool. To do it, inside your project, run the following command in the terminal:

```bash
npx baseai@latest tool
```

The CLI will ask you to provide the name and description of the tool. Let's call it `getCurrentWeather` and provide a description like `Get the current weather for a given location`.

Your tool will be created at `/baseai/tools/get-current-weather.ts`.

---

_In the next learn guide, we will configure the weather tool we created._

---
